Skip to main content

Account Management

createAccount​

const createAccount = async () => {
try {
const response = await authService.createAccount(
"username",
"email@example.com",
"password"
);
console.log(response);
} catch (error) {
console.error(error);
}
};

deleteAccount​

const deleteAccount = async () => {
try {
const response = await authService.deleteAccount();
console.log(response);
} catch (error) {
console.error(error);
}
};

getCurrentUser​

const getCurrentUser = async () => {
try {
const user = await authService.getCurrentUser();
console.log(user);
} catch (error) {
console.error(error);
}
};

updateAccount​

const updateAccount = async () => {
try {
const response = await authService.updateAccount(
"username",
"email@example.com"
);
console.log(response);
} catch (error) {
console.error(error);
}
};